const functions = require('./functions');

function toCamel(str) {
  return str.replace(/([^-])(?:-+([^-]))/g, ($0, $1, $2) => {
    return $1 + $2.toUpperCase();
  });
}

const IPCRouter = (url, params) => {
  const func = functions[toCamel(url)];
  func(params);
}
module.exports = {
  IPCRouter,
};
